<?
foreach($_POST as $key => $vals) {
list($tag,$par)=explode(":",$key);
if($par == ")" && $vals == "") {
$err[$tag]="必須項目です";
}
else {
$$tag = $vals;
}
}
function email($str) {
if(preg_match("/^[a-zA-Z0-9_\.\-]+@([a-zA-Z0-9_\.\-]+\.)+[a-zA-Z]{2,4}$/",$str)) {
return true;
}
else {
return false;
}
}

if($email=="") {
$err['email']="必須項目です";
}
if(email($email)==false) {
$err['email']="　メールアドレスが不正です";
}
if($email!==$email2) {
$err['email']="　メールアドレスが合っていません";
}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>お問合せ確認 | 8bitNews</title>
<meta name="keywords" content="お問合せ,8bitNews" />
<meta name="description" content="お問合せページ確認" />
<link type="text/css" rel="stylesheet" href="http://8bitnews.asia/wp/style/default.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://8bitnews.asia/wp/script/ticker.js"></script>
</head>
<body>
<div id="header">
<div id="logo"><a href="http://8bitnews.asia/wp"><img src="http://8bitnews.asia/wp/images/thumb.jpg" alt="8bitNews">" /></a></div>
<ul id="help">
<li><a href="http://8bitnews.asia/wp/?page_id=78">8bitNews？</a></li>
<li><a href="http://8bitnews.asia/wp/?page_id=423t">Privacy Policy</a></li>
<!--<li><a href="http://8bitnews.asia/wp/contact">お問合せ</a></li>-->
</ul>
<div id="search">
<form method="get" action="http://8bitnews.asia/wp/">
<div id="wordbox"><input type="text" name="s" /></div>
<div id="buttonbox"><input type="submit" value="検索" /></div>
</form>
</div>
</div>

<div id="container" class="cf">

<?
if (!$err) {
?>
<div class="mt10 mb10">この内容でよろしければ送信ボタンを押して下さい。</div>
<?
}
?>

<div class="formmmm">

<form action="mail.php" method="POST" enctype="multipart/form-data">

<table width="100%" border="0" cellpadding="0" cellspacing="0" class="section">

<tr>
<th>お名前<strong>※</strong></th>
<td>姓：　<input name="name" type="hidden" value="<?= $name ?>" />
<?= $name ?>
<strong>
<?= $err['name'] ?>
</strong> 
　名：<input name="name2" type="hidden" value="<?= $name2 ?>" />
<?= $name2 ?>
<strong>
<?= $err['name2'] ?>
</strong></td>
</tr>

<tr>
<th>ふりがな<strong>※</strong></th>
<td>せい：<input name="rubi" type="hidden" value="<?= $rubi ?>" />
<?= $rubi ?>
<strong>
<?= $err['rubi'] ?>
</strong> 
　めい：<input name="rubi2" type="hidden" value="<?= $rubi2 ?>" />
<?= $rubi2 ?>
<strong>
<?= $err['rubi2'] ?>
</strong> </td>
</tr>

<tr>
  <th>ご住所</th>
  <td>
    <span>国名：</span>
<input name="a_country" type="hidden" value="<?= $a_country ?>" />
<?= $a_country ?>
<strong><?= $err['a_country'] ?></strong><br>
    <span>都市名：</span>
<input name="a_era" type="hidden" value="<?= $a_era ?>" />
<?= $a_era ?>
<strong><?= $err['a_era'] ?></strong><br>
    <span>住所：</span>
<input name="a_add" type="hidden" value="<?= $a_add ?>" />
<?= $a_add ?>
<strong><?= $err['a_add'] ?></strong><br>
    <span>建物/部屋番号：</span>
<input name="a_buil" type="hidden" value="<?= $a_buil ?>" />
<?= $a_buil ?>
<strong><?= $err['a_buil'] ?></strong>
  </td>
</tr>

<tr>
<th>電話番号</th>
<td><input name="tel" type="hidden" value="<?= $tel ?>" />
<?= $tel ?>
<strong>
<?= $err['tel'] ?>
</strong></td>
</tr>

<tr>
<th>FAX</th>
<td><input name="fax" type="hidden" value="<?= $fax ?>" />
<?= $fax ?>
<strong>
<?= $err['fax'] ?>
</strong></td>
</tr>

<tr>
<th>携帯電話</th>
<td><input name="cel" type="hidden" value="<?= $cel ?>" />
<?= $cel ?>
<strong>
<?= $err['cel'] ?>
</strong></td>
</tr>


<tr>
<th>電話番号</th>
<td><input name="tel" type="hidden" value="<?= $tel ?>" />
<?= $tel ?>
<strong>
<?= $err['tel'] ?>
</strong></td>
</tr>

<tr>
<th>メールアドレス<strong>※</strong></th>
<td>
<input name="email" type="hidden" value="<?= $email ?>" /><input name="email2" type="hidden" value="<?= $email2 ?>" />
<?= $email ?>
<strong>
<?= $err['email'] ?>
</strong></td>
</tr>

<tr>
<th>
<p>内容<strong>※</strong></p>
</th>
<td><pre><input name="msg" type="hidden" value="<?= $msg ?>" /><?= $msg ?></pre>
<strong>
<?= $err['msg'] ?>
</strong>
</td>
</tr>
</table>

<p class="submit">
<?
if (!$err) {
?><input name="" type="submit" value="送　信">
<?
}
?>
<input type="button" value="戻る" onClick="history.back();"></p>

</form>

</div>

</div></div>
<ul id="about" class="cf">
<li><span>8bitNews Menu</span></li>
<li><a href="http://8bitnews.asia/wp/?page_id=78">8bitNewsとは？</a></li>
<li><a href="http://8bitnews.asia/wp/?page_id=80">投稿方法</a></li>
<li><a href="http://8bitnews.asia/wp/?page_id=169">利用規約</a></li>
<li><a href="http://8bitnews.asia/wp/?page_id=423">プライバシーポリシー</a></li>
<li><a href="http://8bitnews.asia/wp/contact">お問合せ</a></li>
</ul>
<p class="message2u">発信は終わらない</p>
<div id="footer">
<p id="copyright">2012 <a href="http://creativecommons.org/publicdomain/zero/1.0/">8bitNews</a></p>
</div>
<div id="totop"><a href="#header">TOP</a></div>
</body>